import { Dimensions } from 'react-native';
import * as api from './api';

const { width, height } = Dimensions.get('window');
const widthScale = width / 375;
const heightScale = height / 667;

// 性别
const Gender = {
  MALE: '0',
  FEMALE: '1',
  OTHERS: '2',
  properties: {
    '0': { name: '男', code: '0' },
    '1': { name: '女', code: '1' },
    '2': { name: '其他', code: '2' },
  },
};

const LoginType = {
  APP_ACCOUNT: 1, // App账号登录
  CAPITAL_ACCOUNT: 2, // 资金账号登录
  BOTH: 3, // 1+2
};

const SortTypeEnum = {
  default: 'DEFAULT',  // 默认
  total: 'TOTAL',      // 总资产
  availableTotal: 'AVAILABLE_TOTAL',   // 可用资产
  turnoverRate: 'TURNOVER_RATE',       // 周转率
  operDate: 'OPER_DATE',               // 开户时间
  myjby: 'MYJ_BY',                     // 月佣金
  myjj3y: 'MYJ_J3Y'                    // 季佣金
};

const RiskLevelEnum = {
  ['0']: '保守型(最低)',
  ['1']: '保守型',
  ['2']: '谨慎型',
  ['3']: '稳健型',
  ['4']: '积极型',
  ['5']: '激进型',
};

const DirectionTypeEnum = {
  asc: 'ASC',
  desc: 'DESC',
};

const RiskRatingEnum = {
  CONSERVATIVE: '保守型',
  CAUTIOUS: '谨慎型',
  DOVISH: '稳健型',
  ACTIVE: '积极型',
  RADICAL: '激进型',
};

const AccountStatusEnum = {
  OPEN: '已开通',
  UNOPEN: '未开通',
  INCONFORMITY: '条件不符',
};

const RelationTypeEnum = {
  ['1']: '服务关系',
  ['2']: '签约关系',
  ['10']: '开发关系',
};

const CustomerLevelEnum = {
  ['1']: '一级',
  ['2']: '二级',
  ['3']: '三级',
  ['4']: '四级',
  ['5']: '五级',
};

const ActiveEnum = {
  ['0']: '未激活',
  ['1']: '已激活',
};

const FavorEnum = {
  FALSE: '0',
  TRUE: '1',
};

// xiong
const RelationType = {
  turnoverRate: 'turnoverRate',      // 周转率
  myjby: 'myjby',   // 月佣金
  myjj3y: 'myjj3y',  // 季佣金

};
// xiong
const RelationTypeName = {
  // [RelationType.season]: '季佣金',
  // [RelationType.month]: '月佣金',
  // [RelationType.weeks]: '周转率',

  turnoverRate: '周转率',
  myjby: '月佣金',
  myjj3y: '季佣金',

};

export {
  width,
  height,
  widthScale,
  heightScale,
  Gender,
  LoginType,
  api,
  SortTypeEnum,
  RiskRatingEnum,
  RiskLevelEnum,
  DirectionTypeEnum,
  AccountStatusEnum,
  RelationTypeEnum,
  CustomerLevelEnum,
  FavorEnum,
  ActiveEnum,
  RelationType,
  RelationTypeName
};
